#ifndef __TERRAIN_CONTENTS_GENERATOR_FLAT_H__
#define __TERRAIN_CONTENTS_GENERATOR_FLAT_H__

#include "ITerrainContentsGenerator.h"
#include "Engine/Vector2.hpp"
#include <memory>

using namespace PocketSurvival::Engine;

namespace PocketSurvival
{
    class SubsystemGameInfo;

    class TerrainContentsGeneratorFlat : public ITerrainContentsGenerator
    {
    private:
        Vector2 m_oceanCorner;
        Vector2 m_shoreRoughnessFrequency;
		Vector2 m_shoreRoughnessAmplitude;
		Vector2 m_shoreRoughnessOctaves;
        float m_shoreRoughnessOffset[4];

        SubsystemGameInfo *m_subsystemGameInfo;

    public:
        TerrainContentsGeneratorFlat();
        ~TerrainContentsGeneratorFlat();

    public:
        virtual uint32_t getOceanLevel() override;

        virtual Vector3 findCoarseSpawnPosition() override;

        virtual float calculateOceanShoreDistance(float x, float z) override;

        virtual float calculateHeight(float x, float z) override;

        virtual int32_t calculateTemperature(float x, float z) override;

        virtual int32_t calculateHumidity(float x, float z) override;

        virtual float calculateMountainRangeFactor(float x, float z) override;

        virtual void generateChunkContentsPass1(TerrainChunk* chunk) override;

		virtual void generateChunkContentsPass2(TerrainChunk* chunk) override;

		virtual void generateChunkContentsPass3(TerrainChunk* chunk) override;

		virtual void generateChunkContentsPass4(TerrainChunk* chunk) override;

    private:
        void updateFluidIsTop(TerrainChunk* chunk);
    };
    
}

#endif